<%-- 
    Document   : promotionlang
    Created on : Nov 19, 2011, 2:02:21 PM
    Author     : Venus
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
   "http://www.w3.org/TR/html4/loose.dtd">
<%@page import="java.util.*,Beans.NgonNgu, Beans.ThamSoHT,Models.NgonNgu_Model,Models.ThamSoHT_Model"%>
<%
            int langid = (Integer) session.getAttribute("langid"); // ngôn ngữ hiện tại
            String dsts = " 'content', 'notice', 'order', 'promotion', 'promotionname', 'rightmsg', 'promotionlang', 'language', 'action' ";
            ThamSoHT[] mdsts = ThamSoHT_Model.DSThamSo(dsts, langid); // mảng chứa các tham số của trang này.

            String action = mdsts[0].getTenTS();
            String content = mdsts[1].getTenTS();
            String language = mdsts[2].getTenTS();
            String notice = mdsts[3].getTenTS();
            String order = mdsts[4].getTenTS();
            String promotion = mdsts[5].getTenTS();
            String promotionlang = mdsts[6].getTenTS();
            String promotionname = mdsts[7].getTenTS();
            String rightmsg = mdsts[8].getTenTS();
            String msgright = notice + "/" + rightmsg;

            Vector v = (Vector) request.getAttribute("LangKM");            
%>
<h1><img style="margin-right: 13px; opacity: 0.8; margin-top: 4px;" alt="" src="../images/promotion11.png"><%=promotion%></h1>
<div class="cb"></div>
<div class="bloc">
    <div class="title">
        <%=promotionlang %>
        
    </div>
    <div class="content">
        <table>
	<thead>
            <tr>
                <th style="width: 122px; padding-bottom: 5px;"><%=order%></th>
		<th style="width: 267px; padding-bottom: 5px;"><%=language%></th>
		<th style="width: 209px; padding-bottom: 5px;"><%=promotionname%></th>
                <th style="width: 209px; padding-bottom: 5px;"><%=content%></th>
                <th style="width: 209px; padding-bottom: 5px;"><center><%=action%></center></th>
            </tr>
	</thead>
        <tbody id="area">
            <%
                for(int i=0; i<v.size(); i++){
                    Beans.KhuyenMai km = (Beans.KhuyenMai) v.elementAt(i);
            %>
                    <tr>
                        <td style="width: 10%;"><%= i + 1 %></td>
                        <td style=" width: 15%;"><%= Models.NgonNgu_Model.TenNgonNgu(km.getMaNN()) %></td>
                        <td style="width: 30%;"><div id="tenkm_<%= km.getMaNN()%>"><%= km.getTenKM() %></div></td>
                        <td style=" width: 30%;"><div id="noidungkm_<%= km.getMaNN()%>"><%= km.getNoiDungKM() %></div></td>
                        <td>
                            <center>
                            <a href="#" name="<%= km.getMaNN() %>" id="<%=km.getTenKM() %>" class="<%=km.getNoiDungKM() %>" onclick="Edit_KM(this.name, this.id, this.className)"><img style=" margin-right: 15px; width: 17px; margin-top: 2px;" alt="" src="../images/edit.png"></a>
                            <a href="#"   name="<%= km.getMaKM() %>" class="<%= km.getMaNN()%>" lang="<%=msgright%>"  onclick="Save_editKM(this.name, this.className, this.lang)"><img style="width: 20px;" alt="" src="../images/save.png"></a>
                            </center>
                        </td>
                        </tr>
            <%  }
            %>
        </tbody>
        </table>
    </div>
</div>

